package com.tbsoft.ehr.dao.common;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

import com.tbsoft.ehr.dao.BaseDaoImpl;
import com.tbsoft.ehr.model.AttachFile;

public class UploadFileDaoImpl extends BaseDaoImpl<AttachFile> 
implements UploadFileDao{
	
	@SuppressWarnings("unchecked")
	@Override
	public List<AttachFile> getAttachListByBusinessId(String businessId) {
		DetachedCriteria criteria = DetachedCriteria.forClass(AttachFile.class);
		criteria.add(Restrictions.ne("status", "D"));
			criteria.add(Restrictions.eq("bussinessId", businessId));
		return getHibernateTemplate().findByCriteria(criteria);
	}
}
